<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>index</title>
</head>
<body>
    手机号码<input name="mobile" id="mobile" value="18612235770" /> 密码<input type="password" id="password" value="123123">
    <button onclick="submit()">登录</button>

<script type="text/javascript" src="#(contextPath)/assets/front/web/script/jquery.js"></script>
<script type="text/javascript">
    function submit(){
        $.ajax({
            url:"#(contextPath)/login/doLogin",
            type:"post",
            data:{"mobile":$("#mobile").val(),"password":$("#password").val()},
            dataType:"json",
            success:function(data){
                console.log(data);
                if (data.isOk){
                    location.href="#(contextPath)/passport/auth";
                }
            }
        })
    }
</script>
</body>
</html>